package com.yiwangqingshui.many.cglib.demo;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * @author smc
 * @date 2019-02-22 15:07
 * @since
 **/
public class ProxyIntDemo implements MethodInterceptor {

    @Override
    public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {

        System.out.println("b: "+ obj.getClass().getName());

//        System.out.println("start exec");

//        String result =  (String)proxy.invokeSuper(obj,args);


        //  EnableAutoConfiguration
        //org.springframework.boot.autoconfigure..
//        System.out.println("end exec");

        return "hello";

    }





}
